Author: Halfvares Mats, Content Studio Development Team.

Published: 2008-11-28

Updated: 2009-03-30

Applies to:
  • Content Studio ver. 5.0, 5.1, 5.2 Beta 3

Type: Information


Symptoms

On a Content Studio Web site or admin site you receive the error

RemotingException: Port is Busy: All pipe instances are busy.
or
RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.

After one or more retries the Web site works again but the problem tends to return after a while.

Cause

A Content Studio web site can use either the TCP or the IPC channel when communicating with the Content Studio Server. This problem can occur on some installations that uses the IPC channel. This channel uses an underlying operating system named pipe object to communicate data between two processes (i.e the Web site and Content Studio Server). On some systems the operating system and the .NET Remoting infrastructure cannot communicate properly resulting in this error.

Resolution

Even though the problem has not been fixed i .NET Framework, Microsoft and Teknikhuset has been able to find a workaround. This workaround has been applied to the RC 1 and Release version of Content Studio 5.2.

For earlier version of the product you can change the communicating channel to TCP.

For more information on how to change the communication protocol see the article How to change the communication protocol in the knowledgebase.

More information

Microsoft has confirmed that this is a bug in the remoting subsystem in .NET Framework that affects the way impersonated clients handle named pipe recycling. For security reasons named pipe connections opened by an impersonated client (such as ASP.NET in impersonated mode) cannot be reused as normal connections can.

Microsoft Partner support and Product Group has investigated this problem and writes:
When using IPC (named pipe) to communicate with the server, the remoting client will generally cache and reuse the pipe connection. Since pipe connections may vary from one security context to another, the cache will only apply if the calling thread is not impersonated (eg. primary token). In Content Studio, the thread is impersonated by ASP.NET and the pipe connection will always be created new and never reused. The issue is if a client creates and closes the pipe connection in a tight loop, the pipe busy error (Windows system error 231: All pipes are busy) may occur even though the server is under-loaded. There seem to be a race condition in closing and opening, that could cause the file not found error (Windows system error 2: File not found) as well.

For more information about Windows system errors see System Error Codes (0-499).